import instance from "./request";

export const adminLoginApi = (data: ILoginParams): PRT<ILoginData> => instance.post('/admin/login', data)

export const getAdminInfoApi = (): PRT<IGetAdminInfoData> => instance.get('/admin/info')

// export const getUserFocusApi = (params) => instance.get("/v1_0/user/followings?" + 'page=' + params.page + '&per_page=' + params.per_page);
export const getAdminListApi = (params: IGetAdminListParams): PRT<IGetAdminListData> => instance.get('/admin/list', { params })

// 获取用户指定角色 参数类型和返回的data的类型都与getAdminListApi的一样 
export const getRoleListApi = (params: IGetAdminListParams): PRT<IGetAdminListData> => instance.get('/role/list', { params })